const { userRouter } = require('./user.js')
const { weightRouter } = require('./weight.js')
const { targetRouter } = require('./target.js')
const { dietRouter } = require('./diet.js')
const { aiRouter } = require('./ai.js')
const { sportRouter } = require('./sport.js')

const routerArr = [userRouter, weightRouter, targetRouter, dietRouter, aiRouter, sportRouter]

const useRouters = (app) => {
    routerArr.forEach(router => {
        app.use(
            router.routes(),
            router.allowedMethods()
        )
    })
}

module.exports = useRouters